/**
 * Project Name:webProject
 * File Name:UserController.java
 * Package Name:com.jim.controller
 * Date:2017年9月25日下午5:08:32
 * Copyright (c) 2017, chenzhou1025@126.com All Rights Reserved.
 *
*/

package com.jim.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.jim.pojo.UserEntity;
import com.jim.service.IUserService;

/**
 * ClassName:UserController <br/>
 * Function: TODO ADD FUNCTION. <br/>
 * Reason:	 TODO ADD REASON. <br/>
 * Date:     2017年9月25日 下午5:08:32 <br/>
 * @author   dell
 * @version  
 * @since    JDK 1.8
 * @see 	 
 */
@Controller
public class UserController {
	@Resource  
    private IUserService userService;  
      
    @RequestMapping("/showUser")  
    public String toIndex(HttpServletRequest request,Model model){  
        int userId = Integer.parseInt(request.getParameter("id"));  
        UserEntity user = userService.getUserById(userId);  
        model.addAttribute("user", user);  
        return "showUser";  
    }  
}

